#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>  
#include<stdlib.h>  

#define MALLOC(num, type) ((type*)malloc(num * sizeof(type)))  

int main()
{
    int* p1 = (int*)malloc(5 * sizeof(int));

    int* p = MALLOC(5, int);
    if (p == NULL) 
    {
        perror("malloc fail:");
        return 1;
    }
    free(p);
    return 0;
}